<!-- BEGIN: main -->
<script type="text/javascript" src="{NV_BASE_SITEURL}js/divbox/divbox.js"></script>
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}js/divbox/divbox.css" />
<script type="text/javascript">
/*
 * Notes on hue
 *
 * This script uses hue rotation in the following manner:
 * hue=0   is red (#FF0000)
 * hue=60  is yellow (#FFFF00)
 * hue=120 is green (#00FF00)
 * hue=180 is cyan (#00FFFF)
 * hue=240 is blue (#0000FF)
 * hue=300 is magenta (#FF00FF)
 * hue=360 is hue=0 (#FF0000)
 *
 * Notes on the script
 *
 * This script should function in any browser that supports document.getElementById
 * Đã Test Netscape7, Mozilla Firefox 1.0, and Internet Explorer 6
 *
 * Accessibility
 *
 * The script does not write the string out, but rather takes it from an existing
 * HTML element. Therefore, users with javascript disabled will not be adverely affected.
 * They just won't get the pretty colors.
 */

/*
 * splits par.firstChild.data into 1 span for each letter
 * ARGUMENTS
 *   span - HTML element containing a text node as the only element
 */
function toSpans(span) {
  var str=span.firstChild.data;
  var a=str.length;
  span.removeChild(span.firstChild);
  for(var i=0; i<a; i++) {
    var theSpan=document.createElement("SPAN");
    theSpan.appendChild(document.createTextNode(str.charAt(i)));
    span.appendChild(theSpan);
  }
}

/*
 * creates a rainbowspan object
 * whose letters will be colored [deg] degrees of hue
 * ARGUMENTS
 *   span - HTML element to apply the effect to (text only, no HTML)
 *   hue - what degree of hue to start at (0-359)
 *   deg - how many hue degrees should be traversed from beginning to end of the string (360 => once around, 720 => twice, etc)
 *   brt - brightness (0-255, 0 => black, 255 => full color)
 *   spd - how many ms between moveRainbow calls (less => faster)
 *   hspd - how many hue degrees to move every time moveRainbow is called (0-359, closer to 180 => faster)
 */
function RainbowSpan(span, hue, deg, brt, spd, hspd) {
    this.deg=(deg==null?360:Math.abs(deg));
    this.hue=(hue==null?0:Math.abs(hue)%360);
    this.hspd=(hspd==null?3:Math.abs(hspd)%360);
    this.length=span.firstChild.data.length;
    this.span=span;
    this.speed=(spd==null?50:Math.abs(spd));
    this.hInc=this.deg/this.length;
    this.brt=(brt==null?255:Math.abs(brt)%256);
    this.timer=null;
    toSpans(span);
    this.moveRainbow();
}

RainbowSpan.prototype.moveRainbow = function() {
  if(this.hue>359) this.hue-=360;
  var color;
  var b=this.brt;
  var a=this.length;
  var h=this.hue;

  for(var i=0; i<a; i++) {

    if(h>359) h-=360;

    if(h<60) { color=Math.floor(((h)/60)*b); red=b;grn=color;blu=0; }
    else if(h<120) { color=Math.floor(((h-60)/60)*b); red=b-color;grn=b;blu=0; }
    else if(h<180) { color=Math.floor(((h-120)/60)*b); red=0;grn=b;blu=color; }
    else if(h<240) { color=Math.floor(((h-180)/60)*b); red=0;grn=b-color;blu=b; }
    else if(h<300) { color=Math.floor(((h-240)/60)*b); red=color;grn=0;blu=b; }
    else { color=Math.floor(((h-300)/60)*b); red=b;grn=0;blu=b-color; }

    h+=this.hInc;

    this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";
  }
  this.hue+=this.hspd;
}
// End -->
</script>
<div style="margin-top:5px;">
<span style="float: right; text-align: right;text-decoration:none">
<a href="#" class="popup" rel="box_id">Đăng nhập</a> | <a href="{USER_REGISTER}">{LANG.register}</a></span></div>
<script type="text/javascript">
var r1=document.getElementById("r1"); //get span to apply rainbow
var myRainbowSpan=new RainbowSpan(r1, 0, 360, 255, 50, 18); //apply static rainbow effect
myRainbowSpan.timer=window.setInterval("myRainbowSpan.moveRainbow()", myRainbowSpan.speed);
</script>
<p id="r2"></p>
<script type="text/javascript">
var r2=document.getElementById("r2"); //get span to apply rainbow
var myRainbowSpan2=new RainbowSpan(r2, 0, 360, 255, 50, 348); //apply static rainbow effect
myRainbowSpan2.timer=window.setInterval("myRainbowSpan2.moveRainbow()", myRainbowSpan2.speed);
</script>
<div id="box_id" style=" display: none; width: 350px;">
<div style="text-align:center; margin:10px 0px;">
	<p style="font-weight: 18px; color:blue;text-transform:uppercase;font-weight:bold;padding:10px;"> Thành viên đăng nhập</p>
    <a title="Họ Trương Việt Nam" href="{NV_BASE_SITEURL}"><img alt="FoxPlus Portal" title="{SITE_COPYRIGHT}" src="{NV_BASE_SITEURL}images/logo_login.png" height="100" width="230"/></a>

	<br />{LANG.logininfo}
</div>
<form action="{USER_LOGIN}" method="post" class="login clearfix">
    <fieldset> 
		<ul>
			<li style="width: 350px;margin-bottom: 5px;">
				<label style="width: 80px;display: block;float: left;clear: left;margin-left: 10px;font-weight: bold;line-height: 2em;">{LANG.username}</label>
				<input id="block_login_iavim" style="width:240px; margin-right: 10px;" name="nv_login" value="" type="text" class="txt" maxlength="{NICK_MAXLENGTH}" />
			</li>
			<li style="width: 350px;">
				<label style="width: 80px;display: block;float: left;clear: left; margin-left:10px;font-weight: bold;line-height: 2em;"><strong>{LANG.password}</strong></label>
				<input id="block_password_iavim" style="width:240px;margin-right: 10px;"  type="password" name="nv_password" value="" class="txt" maxlength="{PASS_MAXLENGTH}" />
			</li>
			<!-- BEGIN: captcha -->
			<p>
				<label for="block_vimg">
					{LANG.securitycode} 
				</label>
				<img id="block_vimg" src="{NV_BASE_SITEURL}index.php?scaptcha=captcha" width="{GFX_WIDTH}" height="{GFX_HEIGHT}" alt="{N_CAPTCHA}" /><img src="{CAPTCHA_REFR_SRC}" class="refesh" alt="{CAPTCHA_REFRESH}" onclick="nv_change_captcha('block_vimg','block_seccode_iavim');"/>
				<label for="block_seccode_iavim">
					{LANG.securitycode} 
				</label>
				<input id="block_seccode_iavim" name="nv_seccode" type="text" class="txt" maxlength="{GFX_MAXLENGTH}" />
			</p>	
			<!-- END: captcha -->
			<li>
				<div class="clearfix">
					<div class="submit" style="margin-top:5px; margin-left:20px;">
						<input name="nv_redirect" value="{REDIRECT}" type="hidden" />
						<input type="submit" value="{LANG.loginsubmit}" />
					</div>
					<a class="forgot fl" style="padding:5px 0px 0px 25px;" title="{LANG.lostpass}" href="{USER_LOSTPASS}">{LANG.lostpass}?</a>
				</div>
			</li>
		</ul>
        <!-- BEGIN: openid -->		  
        <div style="padding-top:10px;text-align: center;">            
                <img style="margin-right:3px;vertical-align:middle;" alt="{LANG.openid_login}" title="{LANG.openid_login}" src="{OPENID_IMG_SRC}" width="{OPENID_IMG_WIDTH}" height="{OPENID_IMG_HEIGHT}" /> {LANG.openid_login} 
            <br />
			<div style="margin-left: 40px;">
            <!-- BEGIN: server -->			
            <a class="forgot fl" title="{OPENID.title}" href="{OPENID.href}"><img style="margin-right:3px;" alt="{OPENID.title}" title="{OPENID.title}" src="{OPENID.img_src}" width="{OPENID.img_width}" height="{OPENID.img_height}" /> {OPENID.title}</a>
			<!-- END: server -->
			</div>
        </div>
        <!-- END: openid -->
    </fieldset>
</form>
	<div style="text-align: center; color:#7F0037; font-size: 12px;padding: 10px;margin-bottom: 20px;">
		{SITE_COPYRIGHT}
	</div>
</div>				
	<script type="text/javascript">
		$('.lightbox').divbox({caption: false});
		$('.popup').divbox({type: 'element',caption: false});
		$('.ajax').divbox({type: 'ajax',caption: false});
		var opt = {};
			opt.api = {
			start: function(obj){alert('Start...');},
			beginLoad: function(obj){alert('Begin to load ...');},
			afterLoad: function(obj){alert('Load success...');},
			closed: function(obj){alert('Closed...');}
		}
		$('.api').divbox(opt);		
		var opt = {};
		opt.languages = {
			btn_close: 'Dong',
			btn_next: 'Sau',
			btn_prev: 'Truoc',
			click_full_image: 'Xem hinh lon',
			error_not_youtube: 'Day khong phai la link youtube',
			error_cannot_load: "Khong the load trang nay\nMa loi: "
		}
		$('.lang').divbox(opt);
	</script>
<!-- END: main -->
<!-- BEGIN: signed -->
<div style="padding-top: 5px;">

	<div class="" style="float: right; margin-right:10px; display:inline;color: #009933;">
		| {LANG.wellcome}: <strong>{USER.full_name}</strong>  
		<a title="{LANG.edituser}" href="{CHANGE_INFO}"></a> &nbsp;&nbsp;|&nbsp;
		
			<a style="color: #009933;" title="{LANG.changpass}" href="{CHANGE_PASS}"><strong>{LANG.changpass}</strong></a>&nbsp;&nbsp;|&nbsp;
			<a style="color: #009933;" title="{LANG.edituser}" href="{CHANGE_INFO}"><strong>{LANG.edituser}</strong></a>&nbsp;&nbsp;|&nbsp;
			<!-- BEGIN: admin -->		
			<a style="color: #009933;" title="{LANG.logout}" href="{LOGOUT_ADMIN}"><strong>{LANG.logout}</strong></a>
			<!-- END: admin -->
	</div>
</div>	
<div class="clear"></div>
<!-- END: signed -->